﻿@model Ring2Park.Models.Vehicle

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<p class="error">@ViewBag.ErrorMessage</p>

<fieldset>
    <legend>Vehicle</legend>

    @if (User.IsInRole("Administrator"))
    {
        <div class="display-label">UserName</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.UserName)
        </div>
    }
    
    <div class="display-label">License</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.License)
    </div>

    <div class="display-label">Color</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Color)
    </div>

    <div class="display-label">Preferred</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Preferred)
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.VehicleId }) |
    @Html.ActionLink("Back to List", "Index")
</p>
